<?php

namespace App\Http\Controllers\Admin\Setting\Permission;

use App\Http\Controllers\Admin\Controller;
use App\Repositories\Permission\PermissionRepository;
use Illuminate\Http\Request;
use Inertia\Response;

class MenuController extends Controller
{
    public function __construct(Request $request, PermissionRepository $repository)
    {
        $this->request = $request;
        $this->repository = $repository;
    }
    public function index(): Response
    {
        $data = $this->repository->tree();
        return $this->inertia('setting/permission/menu/index',[
            'data' => $data,
        ]);
    }
}
